import { SelectControlSchema } from 'amis/lib/renderers/Form/Select'
import amisUtils from '@/components/amis/amisUtils'
import OssSupplierTypeEnum from '@/core/oss/enums/OssSupplierTypeEnum'

class OssApplicationStatusSelectUtils {
	getSchema = (parmas?: Partial<SelectControlSchema>): SelectControlSchema => {
		const mergeSchema = Object.assign(
			{
				name: 'type',
				type: 'select',
				label: '供应商类型',
				clearable: true,
				options: amisUtils.getSelectOptionsFromBaseEnum(OssSupplierTypeEnum),
			},
			parmas,
		)

		const schema = mergeSchema
		return schema
	}
}

export default new OssApplicationStatusSelectUtils()
